<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="${pageContext.request.contextPath}/editor/jquery/pagination/pagination.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
<link rel="icon" href="${pageContext.request.contextPath}/images/icon.png">
<title>用户列表</title>
</head>
<body>


</body>
<script type="text/javascript">
	
</script>
<!--顶部部分-->
<jsp:include page="../user/top.jsp"></jsp:include>
<!--导航部分-->
<jsp:include page="../user/left.jsp"></jsp:include>
<!--内容部分-->
<div style="position:absolute;left:200px;top:20px;">

	<!--右侧部分-->
	<div >
	
        <div style="border:#E1E1E1 1px solid;width: 800px;">
        <br/>
          <label><font size="2">查询结果</font></label>
        	<table >
            	<tr>
                	 <th><%=request.getScheme()%></th>
                	 <th><%=request.getServerName()%></th>
                	 <th><%=request.getServerPort()%></th>
                	 <th><%=basePath%></th>
                     <th>1111111<%=path%></th>
                     <th>姓名</th>
                     <th>密码</th>
                    
                </tr>
                <s:iterator value="#session.indexCheckVos" var="index">
	                <tr>
	                	<td><s:property value="#index.userName"/></td>
	                    <td><s:property value="#index.password"/></td>
	                </tr>
                </s:iterator>
            </table><br/><br/>
            <center>
            <table >
            	<tr>
            		<td  style="background-color:#FFFFFF ">
            			<div id="pagination"></div>
            		</td>
            		<td style="background-color:#FFFFFF ">共<span style="color: blue;">${pageVOs.pages }</span>页/<span style="color: blue;">${pageVOs.total }</span>条数据
            		    <input type="button" value="导出<<" onclick="exportExcel()" style="background: #FFFFFF;color:#2266BB;margin-left: 40px;"/>
            		</td>
            	</tr>
            </table>
            </center>
        </div>
        <div class="clear"></div>
    </div>
	<div class="clear"></div>
	<div style="display: none;">
		<form id="formSubmit" action="${pageContext.request.contextPath}/findall" method="post">
			<input type="hidden" id="pageNo" name="pageNo"/>
		</form>
	</div>
</div>    	
<div class="clear"></div>
<!--版权部分-->
<jsp:include page="../user/footer.jsp"></jsp:include>
<script type="text/javascript" src="${pageContext.request.contextPath}/editor/jquery/pagination/jquery.pagination.js"></script>
<script type="text/javascript">
	function displayData(pageNo){
		alert("${pageContext.request.contextPath }/findall");
		$("#pageNo").val(parseInt(pageNo)+1);
		formSubmit.action="${pageContext.request.contextPath }/findall";
		formSubmit.submit();
	}
	$(function (){
		var pageNo = ${pageVOs.pageNo};
		var pages = ${pageVOs.pages};
		$("#pagination").pagination(pages, {
			callback: displayData,   
		    prev_text: '上一页',   
		    next_text: '下一页',
		    //每页显示的条目数
		    items_per_page:1,  
		    //连续分页主体部分显示的分页条目数 
		    num_display_entries:5,  
		    //当前选中的页面 
		    current_page:parseInt(pageNo)-1,   
		    //在中间显示....
		    num_edge_entries:5, 
		    //总条目数
		    maxentries: pages, 
		    link_to: "javascript:void(0)"
		}); 
	});
	$(document).ready(function(){
		$("tr:even").css("background-color", "#F0F7FF");
	});
	function exportExcel(){
		formSubmit.action="${pageContext.request.contextPath }/exportByHbx.action";
		formSubmit.submit();
	};
</script>
</html>